package com.flower.queue.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

@Component
public class AlarmConsumer {

    @JmsListener(destination = "publish.queue", containerFactory = "jmsListenerContainerQueue")
    @SendTo("out.queue")
    public String receiveMessage(String text) {
        System.out.println("接收消息：" + text);
        return "consumer-a received : " + text;
    }
}
